import { Component, OnInit } from '@angular/core';
import { Router, NavigationExtras, ActivatedRoute } from '@angular/router';
import {TranslateService} from '@ngx-translate/core';
import { DefaultLanguageService } from '@services/default-language.service';
@Component({
  selector: 'app-account-info',
  templateUrl: './account-info.page.html',
  styleUrls: ['./account-info.page.scss'],
})
export class AccountInfoPage implements OnInit {

  public consentAgreement:boolean = true;
  public hiddenBox:boolean = true;
  accountInfo:any;
  constructor(
    private router:Router,
    private route : ActivatedRoute,
    private translate: TranslateService,
    private defaultLanguageService:DefaultLanguageService
  ) {
    this.route.queryParams.subscribe((data)=>{
      this.hiddenBox = data.accountType == 0?false:true;
      this.accountInfo = data;
     
    });

   }


  ngOnInit() {
  }

  changeConsentAgreement(){
    this.consentAgreement = !this.consentAgreement;
  }

  toNext(){
    let navigationExtras: NavigationExtras = {
      queryParams: {}
    };
    this.router.navigate(['/tabs/myAccount/bank-account/add-bank-account/account-sms'], navigationExtras);
  }
}
